package com.goodlearning.gloriamobile.customdialog;

import com.goodlearning.gloriamobile.commons.Utils;
import android.app.Dialog;
import android.content.Context;
import android.view.View;

/**
 * Dialog 에 대한 Scale 적용
 * @author rapty54
 *
 */
public class AutoScaleDialog extends Dialog{
	
	private Context context ;
	private View[] exceptViewArr;
	private boolean isAppliedScale = false;
	
	public AutoScaleDialog(Context context) {
		super(context);
		this.context = context;
	}
	
	@Override
	public void onAttachedToWindow() {
		super.onAttachedToWindow();
		if(!isAppliedScale){
			isAppliedScale=true;
			Utils.applyScale(getWindow().getDecorView(), Utils.getScale(context, 480, 800), false, exceptViewArr);
		}
	}
}
